﻿<Window x:Class="mskold.TfsAdminToolKit.Views.UpdateWorkItemTypes"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:mskold.TfsAdminToolKit.ViewModels"
        Title="UpdateWorkItemTypes" Height="400" Width="813">
    <Window.DataContext >
        <vm:UpdateWorkItemTypesViewModel />
    </Window.DataContext>
    <Grid >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="20" />
            <ColumnDefinition Width="*" />                  
        </Grid.ColumnDefinitions>
        <DataGrid  Grid.Column="0" Margin="12,130,0,12"  AutoGenerateColumns="False"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" HorizontalGridLinesBrush="{x:Null}" IsReadOnly="False" ItemsSource="{Binding Path=WorkItemTypes}" Name="dataGrid2"  VerticalGridLinesBrush="{x:Null}">
            <DataGrid.Columns>
                <DataGridTemplateColumn>
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Binding="{Binding Path=Name}" Header="WorkItemType" />
            </DataGrid.Columns>
        </DataGrid>
        <DataGrid Grid.Column="2"  Margin="0,130,12,12"  AutoGenerateColumns="False"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" HorizontalGridLinesBrush="{x:Null}" IsReadOnly="False" ItemsSource="{Binding Path=Projects, Mode=TwoWay}" Name="dataGrid1"  VerticalGridLinesBrush="{x:Null}" >
            <DataGrid.Columns>
                <DataGridTemplateColumn>
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Binding="{Binding Path=ProjectName}" Header="Project" />
            </DataGrid.Columns>
        </DataGrid>
        <Button Content="Update " Height="45" HorizontalAlignment="Right" Margin="0,12,12,0" Name="cmdOk" VerticalAlignment="Top" Width="100" Click="cmdOk_Click" Grid.Column="2" />
       
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="184,88,0,0" Name="comboBox1" VerticalAlignment="Top" Width="199" ItemsSource="{Binding Path=Projects}"  
                  DisplayMemberPath="ProjectName" SelectedValue="{Binding Path=SourceProject, Mode=TwoWay}" SelectedValuePath="ProjectName" />
        <CheckBox Content="Create backups of all workitems beeing replaced" Height="16" HorizontalAlignment="Left" Margin="20,12,0,0" Name="checkBox1" VerticalAlignment="Top" IsChecked="{Binding Path=CreateBackup, Mode=TwoWay}" />
        <TextBox Height="25" HorizontalAlignment="Left" Margin="117,34,0,0" Name="textBox1" VerticalAlignment="Top" Width="301" TextChanged="textBox1_TextChanged" Text="{Binding Path=BackupFolder, Mode=TwoWay}" />
        <Label Content="Backup to :" Height="28" HorizontalAlignment="Left" Margin="42,32,0,0" Name="label1" VerticalAlignment="Top" />
        <Label Content="Source for WorkItemTypes :" Height="28" HorizontalAlignment="Left" Margin="20,88,0,0" Name="label2" VerticalAlignment="Top" />
        <Label Content="Select team projects to update :" Height="28" HorizontalAlignment="Left" Margin="416,88,0,0" Name="label3" VerticalAlignment="Top" />
    </Grid>
</Window>
